import 'package:daoyi_ui_admin_getx/generated/locales.g.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class CommonFloatingActionButtonWidget extends StatelessWidget {
  final String title;
  final GestureTapCallback onTap;

  const CommonFloatingActionButtonWidget(
    this.title,
    this.onTap, {
    super.key,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        decoration: BoxDecoration(
          color: Get.theme.colorScheme.primary,
          borderRadius: BorderRadius.circular(10),
        ),
        height: 40,
        margin: const EdgeInsets.all(20),
        child: Center(
          child: Text(
            title,
            style: TextStyle(
              color: Get.theme.colorScheme.surface,
              fontSize: 16,
              fontWeight: FontWeight.w600,
            ),
          ),
        ),
      ),
    );
  }
}
